1. Field of the Invention
The present invention relates generally to computer graphics imagery, and more specifically, toward distortion correction in the display of computer generated imagery.
2. Related Art
Computer graphics applications often require the generation of complex three-dimensional surfaces (e.g., representing a car, a face, etc.) in world space. These complex three-dimensional surfaces are conventionally approximated with a mesh (or tessellation) of polygons (e.g., triangles). Generally, a polygon mesh is a collection of edges and vertices. An edge connects two vertices, and a polygon is a closed sequence of edges.
FIG. 1 illustrates a projection of an object 104 in world space 106 to screen space 108. In this projection, an image generator uses Thales theorem in real time to produce the image exposed to an observer 102. The projection transformation is applied to vertices because in Thales transformation, a straight line defined by a polygon edge in world space 106, is transformed to a straight line defined by the polygon edge in screen space 108.
Note that Thales theorem can be used to identify the distance H2 in screen space 108. First note that L1=M*cos .theta. and H1=M*sin .theta., where M is equal to the distance between observer 102 and vertex 110. By substituting the values for L1 and H1 into Thales theorem, the value H2 is found to be equivalent to L2*tan .theta.. The equation H2=L2*tan .theta. represents the basic equation for generating images in screen space 108. For the remainder of this description, the image generator that projects objects in world space to a planar viewing window is referred to as a k*tan .theta. image generator.
As exemplified in FIG. 1, the computed image generated by the k*tan .theta. image generator can be directly displayed on a monitor or a behind-the-screen projection system as long as the projector is pointing in a direction that is perpendicular to the screen. If the projector is not pointing in a direction that is perpendicular to the screen, the displayed image becomes distorted and the picture produced by the projector may no longer appear rectangular.
In one conventional solution, the trapezoidal distortion is handled directly by the projector. However, standard projectors cannot handle a lot of distortion. Further, standard projectors also have problems with focal distance and brightness regularity. In another conventional solution, the trapezoidal distortion is handled by an image generator that modifies the projection law.
Modification of a projection law becomes increasingly difficult when the screen is no longer flat (e.g., spherical). In this scenario, straight lines in world space are transformed into curved lines in screen space. As noted above, the distortion can be corrected after the image has been generated by modifying the projector. This can be accomplished by adding specific hardware directly to the projector, or as a front end to the projector. In this process, a 2D distortion map is applied to the image produced by the image generator. This solution is acceptable for low levels of distortion.
However, consider a spherical screen (i.e., .theta. projection system). In this scenario, a significant loss of perceived resolution is encountered outside of a 60 degree viewing pyramid. FIG. 2 illustrates a viewing pyramid that is made by joining the observer to the screen 210, which for simplicity is . After 65 degrees (i.e., both .theta..sub.x and .theta..sub.y are greater than 65 degrees), the image correction will have to produce two pixels out of only one that is computed by the image generator, thereby diminishing the resolution.
In another conventional method, distortion correction is performed by subdividing polygon edges. This functionality is usually incorporated into the heart of the pixel-processing system, thereby limiting its portability. In this technique, a grid of distortion information is used to clip polygon edges. A polygon edge is cut into a plurality of segments defined by a plurality of vertices. The position of these vertices are adjusted to match the distortion. A drawback of this conventional method is the processing power required for implementation. The processing power required is substantially increased based upon the increased number of vertices created by the polygon edge subdivisions. This limits the ability to correct distortion on a per-pixel basis.
What is generally needed is a distortion correction system and method that provides an open solution. This would enable the system to compensate for various sources of distortion that include the screen form, projector position, projector's optical lens, the field of view, observer position, etc.